import { TSkillItem } from "./TSkillItem";
import { FilterConst } from "../../../../component/gconst/FilterConst";
import { CursorManager } from "../../../manager/CursorManager";
//class DigSkillRenderer
    
    export  class DigSkillRenderer extends TSkillItem
    {
        constructor()
        {
            super();
            this._bitmap.x = 2;
            this._bitmap.y = 2;
            this.addEventListener(flash.events.MouseEvent.MOUSE_OVER, this.onMouseOver);
            this.addEventListener(flash.events.MouseEvent.MOUSE_OUT, this.onMouseOut);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            this._bitmap.width = 32;
            this._bitmap.height = 32;
            return;
        }

        public /* override */ set selected(arg1: Boolean)
        {
            if (arg1) 
            {
                this.filters = [FilterConst.itemChooseFilter];
            }
            else 
            {
                this.filters = [];
            }
            this.dispatchEvent(new Object /* flash.events.Event */(flash.events.Event.CHANGE, true));
            return;
        }

        /* internal  */onMouseOver(arg1: Object /* flash.events.MouseEvent */): void
        {
            CursorManager.showCursor(CursorManager.UnSoul);
            return;
        }

        /* internal  */onMouseOut(arg1: Object /* flash.events.MouseEvent */): void
        {
            CursorManager.hideCursor();
            return;
        }

        public /* override */ setSize(arg1: number, arg2: number): void
        {
            super.setSize(32, 32);
            return;
        }
    }
